<?php
$sh_languages['latex'] = array(
    // State #0
    array(
        array(
            '/%/i',
            'sh_comment',
            1
        ),
        array(
            '/&|~|\\\\[$_&{}~^%#`\'"|\s\\\\]/i',
            'sh_symbol',
            -1
        ),
        array(
            '/"/i',
            'sh_string',
            2
        ),
        array(
            '/``/i',
            'sh_string',
            3
        ),
        array(
            '/`/i',
            'sh_string',
            4
        ),
        array(
            '/\$\$|\\\\\[|\\\\\]/i',
            'sh_math',
            -1
        ),
        array(
            '/\$/i',
            'sh_math',
            5
        ),
        array(
            '/\\\\textit/i',
            'sh_keyword',
            6,
            1
        ),
        array(
            '/\\\\textbf/i',
            'sh_keyword',
            9,
            1
        ),
        array(
            '/\\\\texttt/i',
            'sh_keyword',
            12,
            1
        ),
        array(
            '/\\\\underline/i',
            'sh_keyword',
            15,
            1
        ),
        array(
            '/\\\\[a-z]+/i',
            'sh_keyword',
            -1
        ),
        array(
            '/\*/i',
            'sh_symbol',
            -1
        ),
        array(
            '/\{[ \t]*$/i',
            'sh_normal',
            -1
        ),
        array(
            '/\[/i',
            'sh_optionalargument',
            18
        ),
        array(
            '/\{/i',
            'sh_argument',
            19
        )
    ),
    // State #1
    array(
        array(
            '/$/i',
            null,
            -2
        )
    ),
    // State #2
    array(
        array(
            '/\\\\(?:\\\\|")/i',
            null,
            -1
        ),
        array(
            '/"/i',
            'sh_string',
            -2
        )
    ),
    // State #3
    array(
        array(
            '/\\\\(?:\\\\|\'\')/i',
            null,
            -1
        ),
        array(
            '/\'\'/i',
            'sh_string',
            -2
        )
    ),
    // State #4
    array(
        array(
            '/\\\\(?:\\\\|\')/i',
            null,
            -1
        ),
        array(
            '/\'/i',
            'sh_string',
            -2
        )
    ),
    // State #5
    array(
        array(
            '/\\\\(?:\\\\|\$)/i',
            null,
            -1
        ),
        array(
            '/\$/i',
            'sh_math',
            -2
        )
    ),
    // State #6
    array(
        array(
            '/$/i',
            null,
            -2
        ),
        array(
            '/\{/i',
            'sh_italics',
            7
        )
    ),
    // State #7
    array(
        array(
            '/$/i',
            null,
            -2
        ),
        array(
            '/\{/i',
            'sh_italics',
            8
        ),
        array(
            '/\}/i',
            'sh_italics',
            -3
        )
    ),
    // State #8
    array(
        array(
            '/\\\\(?:\\\\|\})/i',
            null,
            -1
        ),
        array(
            '/\}/i',
            'sh_italics',
            -2
        ),
        array(
            '/\{/i',
            'sh_italics',
            8
        )
    ),
    // State #9
    array(
        array(
            '/$/i',
            null,
            -2
        ),
        array(
            '/\{/i',
            'sh_bold',
            10
        )
    ),
    // State #10
    array(
        array(
            '/$/i',
            null,
            -2
        ),
        array(
            '/\{/i',
            'sh_bold',
            11
        ),
        array(
            '/\}/i',
            'sh_bold',
            -3
        )
    ),
    // State #11
    array(
        array(
            '/\\\\(?:\\\\|\})/i',
            null,
            -1
        ),
        array(
            '/\}/i',
            'sh_bold',
            -2
        ),
        array(
            '/\{/i',
            'sh_bold',
            11
        )
    ),
    // State #12
    array(
        array(
            '/$/i',
            null,
            -2
        ),
        array(
            '/\{/i',
            'sh_fixed',
            13
        )
    ),
    // State #13
    array(
        array(
            '/$/i',
            null,
            -2
        ),
        array(
            '/\{/i',
            'sh_fixed',
            14
        ),
        array(
            '/\}/i',
            'sh_fixed',
            -3
        )
    ),
    // State #14
    array(
        array(
            '/\\\\(?:\\\\|\})/i',
            null,
            -1
        ),
        array(
            '/\}/i',
            'sh_fixed',
            -2
        ),
        array(
            '/\{/i',
            'sh_fixed',
            14
        )
    ),
    // State #15
    array(
        array(
            '/$/i',
            null,
            -2
        ),
        array(
            '/\{/i',
            'sh_underline',
            16
        )
    ),
    // State #16
    array(
        array(
            '/$/i',
            null,
            -2
        ),
        array(
            '/\{/i',
            'sh_underline',
            17
        ),
        array(
            '/\}/i',
            'sh_underline',
            -3
        )
    ),
    // State #17
    array(
        array(
            '/\\\\(?:\\\\|\})/i',
            null,
            -1
        ),
        array(
            '/\}/i',
            'sh_underline',
            -2
        ),
        array(
            '/\{/i',
            'sh_underline',
            17
        )
    ),
    // State #18
    array(
        array(
            '/$/i',
            null,
            -2
        ),
        array(
            '/\\\\(?:\\\\|\])/i',
            null,
            -1
        ),
        array(
            '/\]/i',
            'sh_optionalargument',
            -2
        )
    ),
    // State #19
    array(
        array(
            '/\\\\(?:\\\\|\})/i',
            null,
            -1
        ),
        array(
            '/\}/i',
            'sh_argument',
            -2
        ),
        array(
            '/\{/i',
            'sh_argument',
            19
        )
    )
);
